<?php 
$oid = $_GET['listing_id'];
$mquery = "select p.* from PROPERTIES p where p.OID = '".$oid."'";
$mresult = mysql_query($mquery) or die ("SQL Error".mysql_error());
$prow = mysql_fetch_assoc($mresult);
if($prow['UNITFLOORNUM'] !='')
{
	$unit = " ".$prow['UNITFLOORNUM'];
}
else
{
	$unit = '';
}
$full_address = $prow['STREETNUM']." ".$prow['STREETDIR']." ".$prow['STREETNAME']." ".$prow['STREETSUFFIX']."".$unit.", ".$prow['CITY']." ".$prow['STATE']." ".$prow['ZIPCODE'];

$query = "Select * from VT_Config where Listing_ID = '".$oid."'";
$result = mysql_query($query) or die ("SQL Error".mysql_error());
$rowv = mysql_fetch_assoc($result);
?>

<table bgcolor="#666666" style=" color:#999999; border-top:1px solid black; border-bottom:1px solid black; font-family:Arial, Helvetica, sans-serif" align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
			<TR>
				<TD align="center" style="padding:2px 0px 2px 20px; height:20px;">
					<table width="825" border="0" cellspacing="1" cellpadding="1">
						  <tr>
							<td align="left" style="color:#FFFFFF; font-size:18px;">
							<?php echo $full_address ?> | 
							Asking Price: $<?php echo number_format($prow['LISTPRICE'], 0) ?>
							</td>
						  </tr>
						</table>
				</TD>
			</TR>
		</Table>


<!--Main Page-->

<?php 
$asql = "Select * from Users u inner join Prop_Owner_Con c on c.Owner = u.ID where c.Prop_OID = '".$oid."'";
$aresult = mysql_query($asql) or die ("SQL Error".mysql_error());
$arow=mysql_fetch_assoc($aresult);
			
?>

<?php require(ABS_PATH."api/realivent_functions.php"); ?>

<table width="800" border="0" cellspacing="0" cellpadding="0" style="font-size:10px;">
  <tr>
    <td valign="top" align="left">
	<?php Get_Feature_Listings($arow['ID']);?>
	</td>
    <td valign='top' width=400 align="left" style="padding:10px 0px 0px 10px;">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td>
				<?php 
			/* agent information */
			
			?>
			<DIV style="padding-top:10px;">
				<div style="float:left">
				<?php if ($arow['Image']!='')
				{ ?>
				<img src='<?php echo SITE_ROOT_URL?>user_images/t75_<?php echo $arow['Image'] ?>'>
				<?
				}
				else
				{
					?>
					<?
				}
				?>
				</div>
			<div style="float:left; padding-left:10px; font-size:12px;">
			<div><strong><?php echo $arow['First_Name'] ?> <?php echo $arow['Last_Name'] ?></strong></div>
			<div>Phone: <?php echo $arow['Phone'] ?></div>
			<div>Email: <a href=mailto:<?php echo $arow['Email'] ?>><?php echo $arow['Email'] ?></a></div>
			<div>Website: <a target="_blank" href=http://<?php echo $arow['Website'] ?>><?php echo $arow['Website'] ?></a></div>
			
			<div align="right" style="padding:5px;">
			<?php if ($arow['Company_Logo']!='')
			{ ?>
			<img src='<?php echo SITE_ROOT_URL?>user_images/t_<?php echo $arow['Company_Logo'] ?>'>
			<?
			}
			else
			{
				?>
				<?
			}
			?>
			</div>
			<div style="clear:left"></div>
				</td>
			  </tr>
			  <tr>
				<td style=" font-size:12px;">
				<HR />
				If you would like any information about my featured listings, feel free to contact me by clicking on the "Contact Agent" tab.
				<BR /><BR />Thanks<BR />
				<?php echo $arow['First_Name'] ?> <?php echo $arow['Last_Name'] ?><BR />
				<?php echo $arow['Brokerage'] ?>
				</td>
			  </tr>
			</table>

	
			
	</td>
  </tr>
</table>